<template>
  <div>
    <h1>App</h1>
    <button @click="show">获取One组件的count</button>
    <hr />
    <One ref="one" />
  </div>
</template>

<script lang="ts">
import { defineComponent } from "vue";

export default defineComponent({
  name: "App",
});
</script>

<script setup lang="ts">
import One from "./component/One/index.vue";
import { ref } from "vue";

const one = ref();
const show = () => {
  console.log(one.value.count);
  one.value.count ++;
};
</script>

<style  scoped >
</style>